package com.xkcyy.study.spring.mvc.handlers;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.nio.charset.StandardCharsets;

/**
 * HandlerController2
 *
 * @author yuand
 * @date 2021/6/22
 **/

@Component("/handler-controller/**")
public class HandlerController2 implements Controller {
    @Override
    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        response.getOutputStream().write("aaaa".getBytes(StandardCharsets.UTF_8));
        return null;
    }
}
